package com.cn.designpatterns.ex.concrete.observer.ob;

/**
 *
 * @author zhangyi
 * @date 2018/12/24 18:48
 */
public class User implements ObserverService {

    private String name;
    private String message;

    public User(String name) {
        this.name = name;
    }

    @Override
    public void update(String message) {
        this.message = message;
        System.out.println(name+"收到,推送消息:"+message);
    }
}
